/*
 * @Author: your name
 * @Date: 2022-03-02 12:11:28
 * @LastEditTime: 2022-03-02 21:58:33
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \vue\server\index.js
 */
let express=require('express')
let app =express()

app.use(function(req,res,next){
  res.header('Access-Control-Allow-Origin', '*');

  res.header('Access-Control-Allow-Headers', 'Content-Type,Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild');

  res.header('Access-Control-Allow-Methods', 'PUT, POST, GET, DELETE,OPTIONS');
  // 千万不要网%%￥￥￥###
  // 千万不要网
  // 千万不要网
  next();
})

let chartOne= require('./router/one')
let chartTwo= require('./router/two')
let chartThree= require('./router/three')
let chartFour= require('./router/Four')
let chartMap=require("./router/map");

app.use('/one',chartOne)
app.use('/two',chartTwo)
app.use('/three',chartThree)
app.use('/four',chartFour)
app.use("/china",chartMap)

app.listen(8888)